package com.letv.whatslive.model.push.message.pass;

import com.alibaba.fastjson.JSON;
import com.letv.whatslive.model.push.message.AbstractPushMessge;
import lombok.Getter;
import lombok.Setter;

/**
 * 安卓消息定义
 * Created by wangjian7 on 2016/8/17.
 */
@Setter
@Getter
public class AndroidMessage extends AbstractPushMessge {

    private String title;
    private String content;
    private int type; //消息类型：0.url，1.直播，2.录播，3.活动
    private Long programId; //直播、录播或者活动ID
    private String shareText; //弹窗显示文案
    private int tag; //4：表示直播推送给关注用户
    private String url;//当Type为url时url或者直播录播H5的url
    private Long sendTime; //发送时间


    ;private AndroidMessage(String title, String content, int type, Long programId, String shareText, int tag, String url){
        this.title = title;
        this.content = content;
        this.type = type;
        this.programId = programId;
        this.shareText = shareText;
        this.tag = tag;
        this.url = url;
        this.setSendTime(System.currentTimeMillis());
    }

    public static AndroidMessage createLiveAndroidMessage(Long programId, String shareText){
        AndroidMessage androidMessage = new AndroidMessage("","",1,programId,shareText,4,"");
        return  androidMessage;
    };

    @Override
    public String toJsonString() {
        return JSON.toJSONString(this);
    }
}
